package com.googlecode.maratische.google.dao;

import java.sql.Date;
import java.sql.SQLException;
import java.util.List;

import com.googlecode.maratische.google.BaseException;
import com.googlecode.maratische.google.model.Item;

public interface ItemDao extends BaseDao<Item>{

	List<Item> findLabeledByFeedId(Integer feedId) throws SQLException, BaseException;
	List<Item> findByLink(String link) throws SQLException, BaseException;
	List<Item> findByFeedId(Integer feedId) throws SQLException, BaseException;
	List<Item> findByFeedIdUnread(Integer feedId) throws SQLException, BaseException;
	List<Item> findReadedForErase(Date date) throws SQLException, BaseException;
	List<Item> listAllLabeled() throws SQLException, BaseException;
	List<Item> listLabeledByType(String type) throws SQLException, BaseException;
	int countAllLabeled() throws SQLException, BaseException;
	int countLabeledByType(String type) throws SQLException, BaseException;
	int countItemsByFeedIdUnread(Integer feedId) throws SQLException, BaseException;
	int countItemsByFeedIdLabeled(Integer feedId) throws SQLException, BaseException;
	void removeReadedItem(Integer feedId,List<Integer> existIds) throws SQLException, BaseException;
	
	String getLocalMediaFolder(String itemId);
	String getRootMediaFolder();
}
